Feature/define config#252
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements the defineConfig feature for ESLint configurations (from issue #244). The changes standardize ESLint configuration generation by wrapping exports with a defineConfig() helper function instead of using framework-specific wrappers like tseslint.config() or raw array exports.
Key changes:
- Introduced
defineConfigimport from'eslint/config'in generated ESLint configurations - Replaced conditional export wrapping logic (typescript vs non-typescript) with unified
defineConfig()approach - Updated ESLint and related dependencies to versions that support the new API
- Added
@ts-expect-errorcomment for type compatibility issue with jsx-a11y plugin
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/categories/js/eslint/eslint.entrypoint.ts |
Modified config builder to always use defineConfig() wrapper with import from 'eslint/config' |
src/categories/js/eslint/config/react:ts.config.ts |
Added @ts-expect-error comment for jsx-a11y plugin type incompatibility |
package.json |
Updated ESLint and related dev dependencies to newer versions supporting defineConfig |
package-lock.json |
Updated dependency lock file with new versions |
eslint.config.mjs |
Applied defineConfig pattern to project's own ESLint config |
__tests__/categories/js/eslint/eslint.entrypoint.test.ts |
Updated test expectations to match new config output format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'eslint.configs.recommended', | ||
| '...tseslint.configs.recommended', | ||
| `pluginReact.configs.flat['jsx-runtime']`, | ||
| `// @ts-expect-error types are not compatible`, |
There was a problem hiding this comment.
The @ts-expect-error comment lacks explanation of which types are incompatible and why. Consider adding a more descriptive comment explaining the specific type incompatibility between the jsx-a11y plugin and the ESLint flat config API, such as: // @ts-expect-error jsx-a11y plugin types don't match flat config interface requirements. This helps future maintainers understand what needs to be fixed when the type incompatibility is resolved.
| `// @ts-expect-error types are not compatible`, | |
| `// @ts-expect-error jsx-a11y plugin types don't match flat config interface requirements`, |
This PR adds defineConfig from #244